# class Person():
#
#     def __init__(self):
#         self.name = '人'
#         self.value = "哺乳类"
#
#     def show(self):
#         print(self.name)
#         print(self.value)
#
# person1 = Person()
# person1.show()

# 广义封装
# class guaishou():
#
#     def __init__(self, name, weight, height):
#         print("准备初始化".center(50, "*"))
#         self.name = name
#         self.weight = weight
#         self.height = height
#         print("初始化完成".center(50, "*"))
#
#     def show(self):
#         print("Hello ，我来了：")
#         print("我的名字是：", self.name)
#         print("我的身高是：", self.weight)
#         print("我的体重是：", self.height)
#
# bianhao666=guaishou("小白",80,180)
# print(bianhao666.name)

# bianhao666.show()

# # 狭义封装
# class User:
#     __Country = 'China'  # 私有的静态变量
#
#     def __init__(self, name, passwd):
#         self.usr = name
#         self.__pwd = passwd  # 私有的实例变量/私有的对象属性
#
#     def __func(self):  # 私有的实例方法/私有的对象方法
#         print('in Son')
#
#     def printCountry(self):
#         print(self.__Country)
#
# xiaoming = User('小明', "123456")
# xiaoming.printCountry()


